using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SPVisualDev
{
    public partial class PromptNewFeatureName : Form
    {
        public PromptNewFeatureName()
        {
            InitializeComponent();

            this.txtFeatureName.KeyPress += new KeyPressEventHandler(txtFeatureName_KeyPress);
        }

        void txtFeatureName_KeyPress(object sender, KeyPressEventArgs e)
        {
            try
            {
                if (e.KeyChar == '\r')
                {
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                DialogError.ShowError(ex);
            }
        }

        public string PropName
        {
            get { return txtFeatureName.Text; }
            set { txtFeatureName.Text = value; }
        }
    }
}